package com.tmeone.erpone.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tmeone.erpone.entity.TVehicle;
import com.tmeone.erpone.mapper.TVehicleMapper;
import com.tmeone.erpone.service.ITVehicleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TVehicleServiceImpl extends ServiceImpl<TVehicleMapper, TVehicle> implements ITVehicleService {
    @Autowired
    private TVehicleMapper vehicleMapper;

    @Override
    public List<TVehicle> vehicleByNumberPlate() {
        return vehicleMapper.vehicleByNumberPlate();
    }

    @Override
    public IPage<TVehicle> getPageVehicle(IPage<TVehicle> page) {
        return vehicleMapper.pageVehicle(page);
    }

    @Override
    public IPage<TVehicle> pageVehicleNameId(IPage<TVehicle> page, String input1, String input2) {
        return vehicleMapper.pageVehicleNameId(page,input1,input2);
    }

    @Override
    public TVehicle addVehicle(String vehicleId, String vehicleName, String logisticsId, String[] driverId, String numberPlate, String vehicleType, String driverSize, String remarks) {
        return vehicleMapper.addVehicle(vehicleId,vehicleName,logisticsId,driverId,numberPlate,vehicleType,driverSize,remarks);
    }
}
